package cn.b.sky.mes.em.service;

import java.util.List;

import cn.b.sky.mes.em.model.Failure;
import cn.b.sky.mes.em.model.condition.FailureCondition;
import cn.b.sky.common.model.BatchJobReport;

/**
 * 
 * <strong>Title : FailureService.java<br></strong>
 * <strong>Package : cn.b.sky.mes.em.service<br></strong>
 * <strong>Description : </strong>故障代码业务接口<br> 
 * <strong>Create on : 2015-11-3 下午02:03:38<br></strong>
 * <p>
 * @author zhaoxin01<br>
 * @version <strong>v1.0.0</strong><br>
 * <br>
 * <strong>修改历史:</strong><br>
 * 修改人 | 修改日期 | 修改描述<br>
 * -------------------------------------------<br>
 * <br>
 * <br>
 */
public interface FailureService {
  /**
   * 
   * <strong>Title : selectFailureByCondition<br></strong>
   * <strong>Description : </strong>分页查询故障代码<br> 
   * <strong>Create on : 2015-11-3 下午01:16:40<br></strong>
   * <p>
   * @param failureCondition
   * @return
   * List<Failure>
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Failure> selectFailureByCondition(FailureCondition failureCondition);

  /**
   * 
   * <strong>Title : selectFailureCount<br></strong>
   * <strong>Description : </strong>查询故障代码条数<br> 
   * <strong>Create on : 2015-11-3 下午01:18:57<br></strong>
   * <p>
   * @param failureCondition
   * @return
   * int
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  int selectFailureCount(FailureCondition failureCondition);

  /**
   * 
   * <strong>Title : selectFailureByCode<br></strong>
   * <strong>Description : </strong>根据代码查询故障<br> 
   * <strong>Create on : 2015-11-3 下午01:20:05<br></strong>
   * <p>
   * @param siteCode
   * @param failureCode
   * @return
   * Failure
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  Failure selectFailureByCode(String siteCode, String failureCode);

  /**
   * 
   * <strong>Title : insertFailure<br></strong>
   * <strong>Description : </strong>新增故障<br> 
   * <strong>Create on : 2015-11-3 下午01:21:01<br></strong>
   * <p>
   * @param failure
   * void
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void insertFailure(Failure failure);

  /**
   * 
   * <strong>Title : updateFailure<br></strong>
   * <strong>Description : </strong>修改故障<br> 
   * <strong>Create on : 2015-11-3 下午01:21:31<br></strong>
   * <p>
   * @param failure
   * void
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  void updateFailure(Failure failure);

  /**
   * 
   * <strong>Title : deleteFailure<br></strong>
   * <strong>Description : </strong>删除故障<br> 
   * <strong>Create on : 2015-11-3 下午01:22:00<br></strong>
   * <p>
   * @param siteCode
   * @param failureCode
   * BatchJobReport
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  BatchJobReport deleteFailure(String siteCode, String failureCode);

  /**
   * 
   * <strong>Title : selectFailureForSuggest<br></strong>
   * <strong>Description : </strong>故障搜索建议<br> 
   * <strong>Create on : 2016年4月11日 下午7:43:05<br></strong>
   * <p>
   * @param failureCondition
   * @return
   * List<Failure>
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  List<Failure> selectFailureForSuggest(FailureCondition failureCondition);
}
